package com.xu.sms.utils;

public class PageUtil {
	private  int pageNum = 3;
	private  int curPage;
	private  int totoalPage ;
	private int totalRecord; //总记录数
	
	public PageUtil(int curPage,int totalRecord){
		this.totalRecord = totalRecord;
		this.curPage = curPage;
	}
	public PageUtil(){};
	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	
	
	public int getCurPage() {
		return curPage;
	}
	public void setCurPage(int curPage) {
		this.curPage = curPage;
	}
	public int getTotoalPage() {
		totoalPage  = totalRecord / pageNum;
		if((totalRecord %pageNum) !=0){
			totoalPage +=1 ;
		}
		return totoalPage;
	}

	
	
	public int getTotalRecord() {
		return totalRecord;
	}
	public void setTotalRecord(int totalRecord) {
		this.totalRecord = totalRecord;
	}
	
	
	
}
